package com.bachelor.community.service.intf;

import com.bachelor.community.model.dto.QuestionDTO;
import com.bachelor.community.model.entity.Question;
import com.bachelor.community.model.entity.User;
import com.bachelor.community.model.vo.QuestionVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

public interface QuestionService extends IService<Question> {
    IPage<QuestionVO> listQuestions(int currentPage, int pageSize, String orderColumn, String keyword);

    IPage<QuestionVO> listQuestions(int currentPage, int pageSize, QueryWrapper<QuestionVO> queryWrapper);

    IPage<QuestionVO> listQuestionsByUserId(Integer currentPage, Integer pageSize, Integer userId);

    Question insertQuestion(QuestionDTO questionDTO, User user);

    QuestionVO getQuestionVOById(Long id);

    IPage<QuestionVO> listQuestionsByTagId(Integer currentPage, Integer pageSize, Integer tagId, String tabName);

    QuestionVO partialUpdateQuestion(Long id, QuestionDTO questionDTO);
}
